package com.third.service.Impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.third.entity.InboundOrder;
import com.third.entity.InboundResult;
import com.third.mapper.InBoundMapper;
import com.third.service.InBoundService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@Service
public class InBoundServiceImpl extends ServiceImpl<InBoundMapper, InboundOrder> implements InBoundService{

    @Resource
    private InBoundMapper inBoundMapper;


    @Override
    public IPage<InboundResult> getList(HashMap<String, Object> map) {
        List<InboundResult> inList=inBoundMapper.getList(map);
        int current =(int) map.get("current");
        int size =(int) map.get("size");
        IPage<InboundResult> page=new Page<>(current,size);
        page.setRecords(inList);
        return page;
    }
}
